package com.panopset.games.mocean;

import com.panopset.compat.MathUtil;
import com.panopset.fundraw.Sprite;

public class MoceanSprite extends Sprite {

    public static final int RADIUS = 3;

    @Override
    protected int getRadius() {
        return RADIUS;
    }

    @Override
    protected int[] getLocation() {
        return new int[] {dw/2,dh/2};
    }

    protected int dw=100, dh=100;
    public void center(int width, int height) {
        dw = width;
        dh = height;
        calculateBounds();
    }

    int toggle = 0;
    public int getColorAsInt() {
        toggle = 1 - toggle;
        if (toggle > 0) {
            return 0xffccccff;
        } else {
            return 0xccccff00;
        }
    }

    public int getMembraneColorAsInt() {
        return 0xccccddcc;
//        if (toggle > 0) {
//            return 0xffccccff;
//        } else {
//            return 0xffccccff;
//        }
    }

    public MoceanSprite split() {
        int direction = MathUtil.random(0, 359);
        int x = (int) ((RADIUS * 2) * Math.cos(direction));
        int y = (int) ((RADIUS * 2) * Math.sin(direction));
        MoceanSprite nms = new MoceanSprite();
        //nms.setLocation(x, y);
        return null;
    }

}
